#include "gifcommentextension.h"

namespace WingGif {

QString GifCommentExtension::text() { return _text; }

bool GifCommentExtension::read(QIODevice *stream,
                               QList<GifExtension *> controlExtensions) {
  Q_UNUSED(controlExtensions)
  char len;
  stream->read(&len, 1);
  if (len > 0) {
    _text = stream->read(len);
    return true;
  }
  return false;
}

GifBlockKind GifCommentExtension::kind() {
  return GifBlockKind::SpecialPurpose;
}

GifCommentExtension::GifCommentExtension(QObject *parent)
    : GifExtension(parent) {}

} // namespace WingGif
